<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>

    <div id="app">
        <button @click="getJoke()">获取笑话</button>
        <div>{{joke}}</div>
    </div>

    <script>
        var app = new Vue({
            el:"#app",
            data:{
                joke:""
            },
            methods:{
                getJoke:function () {
                    var tem = this;
                    axios.get("https://autumnfish.cn/api/joke").then(function (response) {
                        tem.joke = response.data;
                    },function (err) {})
                }
            }
        })
    </script>
</body>
</html>